<template>
  <!-- Recommended Hospital -->
  <div class="recommended">
    <div style="border-bottom: 1px solid #CBD1D7;">
      <div class="title">Recommended Hospital</div>
    </div>
    <div class="hospital_list">
        <div class="hospital_card" v-for="(item,index) in recommendedHospital" :key="index">
          <nuxt-link target="_blank" :to="'/hospitalDetails/' + item.id + '.html'">
            <img :src="item.hospitalImgPath" class="hospital_img">
          </nuxt-link>
          <nuxt-link target="_blank" :to="'/hospitalDetails/' + item.id + '.html'">
            <div class="hospital_info">{{ item.hospitalEnglishName }}</div>
          </nuxt-link>
        </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["recommendedHospital"],
}
</script>

<style lang="scss" scoped>
.recommended{
  width: 824px;
  .title{
    font-weight: bold;
    font-size: 18px;
    color: #0041A3;
    line-height: 62px;
    border-bottom: 4px solid #0041A3;
    width: fit-content;
  }
  .hospital_list{
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 24px;
    .hospital_card{
      width: 404px;
      background: #F5F8FD;
      border-radius: 8px;
      display: flex;
      justify-content: flex-start;
      padding: 16px;
      box-sizing: border-box;
      margin-bottom: 16px;
      .hospital_img{
        width: 180px;
        height: 150px;
        cursor: pointer;
      }
      .hospital_info{
        margin-left: 16px;
        padding: 27px 0;
        font-weight: bold;
        font-size: 18px;
        color: #2E343E;
        line-height: 32px;
        height: 70px;
        // 超出....
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        cursor: pointer;
      }
    }
  }
}
</style>